using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace ELF.Controllers;

[ApiController]
[Route("[controller]")]
public class InfoController : ControllerBase
{
    private readonly ConsulOptions _options;

    public InfoController(IOptions<ConsulOptions> options)
    {
        _options = options.Value;
    }

    [HttpGet]
    public ActionResult<string> Get()
    {
        return Ok($"IdentityApi-{Environment.GetEnvironmentVariable("ASPNETCORE_URLS")} is healthy.");
    }
}
